-
Notifications
You must be signed in to change notification settings - Fork 9
Rename close() to aclose() in Broadcast and Anycast
#408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
This is done to follow Python's convention. With this change now channels can be used with the `aclosing()` context manager for example. The name `close()` is still available for backwards compatibility, but deprecated. Signed-off-by: Leandro Lucarella <[email protected]>
|
Wait, haven't we spoken about this many times already? The |
|
Maybe we change the implementation to wait until the receivers are drained? Alternatively, create a task that would trigger the condition variable, and make |
|
Moving the discussion to the issue (in case we close this PR in favor of another approach, so the discussion is preserved until the issue is fixed): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed my opinion on this and think the action we take (of stopping senders) is already sufficient to call this aclose.
This is done to follow Python's convention. With this change now channels can be used with the
aclosing()context manager for example.The name
close()is still available for backwards compatibility, but deprecated.Fixes #379.